package cvo.chess.client.ui.chessboard;

import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;

public class PieceWidget extends Widget{
	private String name;

	public PieceWidget(String name) {
		this.name = name;
	}

	public String getPieceWidget() {
		if (this.name == "pawn_black") {
			String a = "/images/pawn_black.png";
			return a;
		}
		if (this.name == "rook_black") {
			String a = "/images/rook_black.png";
			return a;
		}
		if (this.name == "knight_black"){
			String a = "/images/knight_black.png";
			return a;
		}		
		if (this.name == "bishop_black"){
			String a = "/images/bishop_black.png";
			return a;
		}
		if (this.name == "queen_black"){
			String a = "/images/queen_black.png";
			return a;
		}
		if (this.name == "king_black"){
			String a = "/images/king_black.png";
			return a;
		}
		
		if (this.name == "pawn_white") {
			String a = "/images/pawn_white.png";
			return a;
		}
		if (this.name == "rook_white") {
			String a = "/images/rook_white.png";
			return a;
		}
		if (this.name == "knight_white"){
			String a = "/images/knight_white.png";
			return a;
		}
		if (this.name == "bishop_white") {
			String a = "/images/bishop_white.png";
			return a;
		}
		if (this.name == "queen_white"){
			String a = "/images/queen_white.png";
			return a;
		}
		if (this.name == "king_white"){
			String a = "/images/king_white.png";
			return a;
		}
		String a = "/images/empty.png";

		return a;
	}
}
